<template>
    <div>
        <van-search v-model="value" shape="round"  placeholder="请输入搜索关键词" />
        <van-swipe :autoplay="3000" lazy-render>
            <van-swipe-item v-for="image in images" :key="image">
                <img :src="image" style="width: 100%; height: 300px;" />
            </van-swipe-item>
        </van-swipe>
        <van-grid :column-num="4">
            <van-grid-item v-for="item in catitems" :icon="item.image_src" :text="item.name" />
        </van-grid>
        <div v-for="item in floordata">
            <img :src="item" alt="">
            <div>
                <img src="" alt="">
            </div>
        </div>
    </div>
</template>

<script setup>
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
];
import {catitemsApi,floordataApi} from '@/api/api'
import {ref} from 'vue'
let catitems=ref([])
catitemsApi().then(res=>{
    console.log('导航',res);
    catitems.value=res.data.message
})
// 楼层
let floordata=ref([])
floordataApi().then(res=>{
    console.log('楼层',res);
    floordata.value=res.data.message
})
</script>

<style lang="scss" scoped></style>